package com.solidumgame.locroninja.juego.ingredientes.bota
{
	
	import com.solidumgame.locroninja.juego.Partida;
	import com.solidumgame.locroninja.juego.ingredientes.Ingrediente;
	import com.solidumgame.locroninja.juego.ingredientes.IngredienteCortado;
	
	import flash.geom.Vector3D;
	
	import libs.away3d.containers.ObjectContainer3D;
	import libs.away3d.core.base.Mesh;
	import libs.away3d.core.utils.Cast;
	import libs.away3d.loaders.Collada;
	import libs.away3d.materials.BitmapMaterial;
	import libs.away3d.materials.Material;
	import libs.away3d.materials.PhongBitmapMaterial;
	import libs.away3d.primitives.Cube;
	import libs.jiglib.geometry.JBox;
	import libs.jiglib.physics.RigidBody;
	import libs.jiglib.plugin.away3d.Away3dMesh;
	
	public class BotaCortadoTop extends IngredienteCortado
	{
		
		[Embed(source="./assets/texturas/ingredientes/Bota.jpg")] // MIME-type important!
		private static var BotaTextura : Class;
		
		[Embed(source="./assets/texturas/ingredientes/BotaCortadoTop.dae",mimeType="application/octet-stream")] // MIME-type important!
		private static var BotaCortadoTopDAE : Class;
		
		private static var material:Material = new BitmapMaterial(Cast.bitmap(BotaTextura));
		
		public function BotaCortadoTop()
		{
			super();

			
			var papa:ObjectContainer3D = Collada.parse(BotaCortadoTopDAE,{ autoLoadTextures:false}); 
			
			(papa.children[0] as Mesh).material = material;
			
			
			_modelo3D.addChild(papa);
			
			//Creamos modelo de fisica
			_modeloFisica =  new JBox(new Away3dMesh(_modelo3D),61,61,30.5);
			_id = _modeloFisica.id;
			_modeloFisica.collisionType = 1;
			
			_modeloFisica.setAngVel(new Vector3D(Math.random(),Math.random(),Math.random()));
			
			_valido = false;
			
		}
	}
}